package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class CopyDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream str=new FileOutputStream("aKk.jpg");
        FileInputStream tell=new FileInputStream("da.jpg");
        long start=System.currentTimeMillis();
        int a;
        while((a=tell.read())!=-1){
            str.write(a);
        }
        long de=System.currentTimeMillis();
        System.out.println("赋值耗时"+(de-start));
        System.out.println("搞定");
        str.close();
        tell.close();
    }
}
